{extend name="base/main" /}
{block name="body"}
<div class="layui-form-item">
    <div class="layui-inline">
        <label class="layui-form-label">分组选择框</label>
        <div class="layui-input-inline">
            <select name="quiz">
                <option value="">请选择问题</option>
                <optgroup label="城市记忆">
                    <option value="你工作的第一个城市">你工作的第一个城市</option>
                </optgroup>
                <optgroup label="学生时代">
                    <option value="你的工号">你的工号</option>
                    <option value="你最喜欢的老师">你最喜欢的老师</option>
                </optgroup>
            </select>
        </div>
    </div>
    <div class="layui-inline">
        <label class="layui-form-label">搜索选择框</label>
        <div class="layui-input-inline">
            <select name="modules" lay-verify="required" lay-search="">
                <option value="">直接选择或搜索选择</option>
                <option value="1">layer</option>
                <option value="2">form</option>
                <option value="3">layim</option>
                <option value="4">element</option>
                <option value="5">laytpl</option>
                <option value="6">upload</option>
                <option value="7">laydate</option>
                <option value="8">laypage</option>
                <option value="9">flow</option>
                <option value="10">util</option>
                <option value="11">code</option>
                <option value="12">tree</option>
                <option value="13">layedit</option>
                <option value="14">nav</option>
                <option value="15">tab</option>
                <option value="16">table</option>
                <option value="17">select</option>
                <option value="18">checkbox</option>
                <option value="19">switch</option>
                <option value="20">radio</option>
            </select>
        </div>
    </div>
</div>
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>新增视频专题素材列表</h5>
        </div>
        <div class="layui-btn-container">
            <a href="{:url('Materiallist/create')}" type="button" class="layui-btn">新增视频专题素材</a>
        </div>
        <div class="ibox-content">
            <div class="row row-lg">
                <div class="col-sm-12">
                    <div class="search-area" id="toggle" style="margin-bottom: 15px;">
                        <form class="form-horizontal m-t" action="{:url('Materiallist/create')}" method="get">
                            <div class="form-group">
                                <div class="col-sm-4 col-sm-offset-1">
                                    <button class="btn btn-primary btn-sm" type="submit">搜索</button>
                                    <a href="{:url('Materiallist/index')}" class="btn btn-default btn-sm">撤销搜索</a>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="fixed-table-toolbar">
                        <div class="bars pull-left" style="margin-top:0px;">
                            <a href="{:url('Materiallist/create')}" class="btn btn-sm btn-primary search-toggle"><i class="fa fa-search"></i>添加栏目</a>
                            <a href="javascript:void(0);" class="btn btn-sm btn-primary search-toggle"><i class="fa fa-search"></i>&nbsp;&nbsp;搜索</a>
                            <a href="{:url('Materiallist/create')}" class="btn btn-sm btn-primary"><i class="fa fa-plus"></i>&nbsp;&nbsp;添加</a>
                            <a href="javascript:void(0);" class="btn btn-sm btn-primary confirm ajax-post" target-form="id" url="{:url('Materiallist/remove')}"><i class="fa fa-close"></i>&nbsp;&nbsp;删除</a>
                            <a href="javascript:void(0);" class="btn btn-sm btn-primary confirm ajax-post" target-form="id" url="{:url('Materiallist/state',['status'=>1])}"><i class="fa fa-check"></i>&nbsp;&nbsp;启用</a>
                            <a href="javascript:void(0);" class="btn btn-sm btn-primary confirm ajax-post" target-form="id" url="{:url('Materiallist/state',['status'=>2])}"><i class="fa fa-ban"></i>&nbsp;&nbsp;禁用</a>
                        </div>
                    </div>
                    <div class="example-wrap">
                        <div class="example">
                            <table class="table table-hover">
                                <thead>
                                <tr>
                                    <th><input type="checkbox" class="i-checks check-all"></th>
                                    <th>编号</th>
                                    <th>素材名称</th>
                                    <th>素材封面</th>
                                    <th>排序</th>
                                    <th>是否显示</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                {volist name="list" id="vo"}
                                <tr>
                                    <td><input type="checkbox" class="i-checks ids" name="id[]" value="{$vo.id}"/></td>
                                    <td>{$vo.id}</td>
                                    <td>{$vo.title}</td>
                                    <td>{$vo.image}</td>
                                    <td>{$vo.sort}</td>
                                    <td>{$vo.is_show}</td>
                                    <td>
                                        <a href="{:url('Materiallist/edit',['id'=>$vo['id']])}" class="btn btn-info btn-xs"><i class="fa fa-paste"></i> 编辑 </a>
                                        <a href="{:url('Materiallist/info',['id'=>$vo['id']])}" class="btn btn-info btn-xs"><i class="fa fa-paste"></i> 简介 </a>
                                        <a href="javascript:void(0);" class="btn btn-danger btn-xs confirm tabledel ajax-post-a" target-form="id" data-id="{$vo.id}" url="{:url('Materiallist/delete',['id'=>$vo['id']])}"><i class="fa fa-trash"></i> 删除 </a>
                                    </td>
                                </tr>
                                {/volist}
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>`

        </div>
    </div>
</div>
{/block}